The mv* command can also be used to actually move a file from one directory to another directory. After using this command, the file no longer exists in its original directory. The mv command has exactly the same syntax as the cp command. You must specify the pathname of the existing file followed by the pathname or filename that you want to assign to it. As with the cp* command, if the destination file is to have the same name as the file you want to move, then only the name of the destination directory need be supplied.
In this example, a file is moved from the current directory to the bin directory off of Sam's home directory.